<?php
//类目管理
namespace app\adminbackstage\model;

use think\Model;
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

class Category extends Model{

    // 模型初始化
    protected static function init()
    {
        parent::init();
        //TODO:初始化内容
    }

    //类目信息
    public function categoryFind($where){
        $list = $this::name('category')
        ->where($where)
        ->find();
        return $list;
   
    }
    
        //类目列表
    public function listCategory($page=1,$num=10,$where){
        $list = $this::name('category')
        ->where($where)
        ->limit(($page-1)*$num,$num)
        ->select();
        return $list;
   
    }
  
}
